﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="RequestActivity.aspx.cs" Inherits="KPIS.GERP.ESS.APP.App_UI.Forms.RequestActivity" %>

<asp:Content ID="Content1" runat="server" contentplaceholderid="ContentPlaceHolder1">  
    
   <link href= "../Styles/CssClass.css" rel="cssclass" type="text/css" />
   <link href= "../Styles/StyleSheet.css" rel="stylesheet" type="text/css" /> 
        
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">        
            <script type="text/javascript">
                function onTextChange(sender) 
                {
                    if (sender.get_value() == "") 
                    { sender.set_text("");}
                }            
                function openDetails(trainee_seq)
                {
                   radopen("ES_TrainingRequestApp.aspx?Sequence=" + trainee_seq,"RadWindow1");
                }
            </script>    
    </telerik:RadCodeBlock>
      
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Panel6">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel6" LoadingPanelID="RadAjaxLoadingPanel2" /> 
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
    </telerik:RadAjaxLoadingPanel>    
    
    <asp:panel ID="Panel6" runat="server" >
    <table width="1000" cellpadding="0" cellspacing="0">        
        <tr>
        <td>
        <div class="moduleDivSlim1000">
        <div class="moduleDivBottom1000">
        <table align="center" width ="980px" >
        <tr>
            <td align="left" class="header-grid" >รายการสมัครเดินทางไปต่างประเทศ </td>
        </tr>
        </table>
        <table width ="980px" align="center">
        <tr>
        <td align="left">
        <asp:Panel ID="PanelGrid" runat="server" Height="350px" ScrollBars="Auto" Visible="true" Width="969px">
            <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="RadGrid2" 
                runat="server" 
                AllowAutomaticDeletes="True" 
                AllowFilteringByColumn="True" 
                AllowMultiRowEdit="True" 
                AllowMultiRowSelection="True" 
                AllowPaging="True" 
                AllowSorting="True" 
                AutoGenerateColumns="False" 
                EnableAJAX="True" 
                EnableAJAXLoadingTemplate="True" 
                GridLines="None" 
                OnItemCommand="RadGrid2_ItemCommand" 
                 
                Width="950px">
                <MasterTableView 
                    AllowMultiColumnSorting="True" 
                    CellSpacing="-1" 
                    ClientDataKeyNames="act_request_seq" 
                    CommandItemDisplay="Top" 
                    DataKeyNames="act_request_seq" 
                    NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                    <CommandItemTemplate>
                        <table width="99%">
                            <tr>
                                <td align="left">
                                   <asp:LinkButton ID="AddInstitute" runat="server" CommandName="AddData" Visible="true">
                                        <img alt="" src="../Images/Buttons/AddRecord.gif" 
                                            style="border:0px;vertical-align:middle;" /> เพิ่มรายการใหม่
                                    </asp:LinkButton>
                                </td>
                                <td align="right">
                                
                                </td>
                            </tr>
                            <tr><td></td></tr>
                        </table>
                    </CommandItemTemplate>
                    <Columns>        
                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" 
                            DataFormatString="{0:d}" 
                            DataField="send_date" 
                            FilterControlWidth="100%" HeaderText="วันที่สมัคร" ShowFilterIcon="false" 
                            UniqueName="send_date" >
                            <HeaderStyle HorizontalAlign="Center" Wrap="False" Width="80px"/>
                        </telerik:GridBoundColumn>                                                                                   
                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" DataField="bgm_proj_oper_name" 
                            FilterControlWidth="100%" HeaderText="ชื่อกิจกรรม" ShowFilterIcon="false" 
                            UniqueName="bgm_proj_oper_name" Visible="true">
                            <HeaderStyle HorizontalAlign="Center" Wrap="False" />
                        </telerik:GridBoundColumn>                       
                                                
                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" Visible = "false"
                            CurrentFilterFunction="Contains" DataField="date_activity_start" 
                            FilterControlWidth="100%" HeaderText="วันที่จัด" 
                            ShowFilterIcon="false"
                            DataFormatString="{0:d}"  
                            UniqueName="date_activity_start">
                            <HeaderStyle HorizontalAlign="Center" Width="80px" Wrap="False" />
                        </telerik:GridBoundColumn>                        
                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" DataField="upper_approved_status" 
                            FilterControlWidth="100%" HeaderText="ผลการพิจารณา&lt;BR&gt;(ผู้บังคับบัญชา)" ShowFilterIcon="false" 
                            UniqueName="upper_approved_status">
                            <HeaderStyle HorizontalAlign="Center" Wrap="False" Width="100px"/>
                        </telerik:GridBoundColumn>                           
                       <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" DataField="approved_status" 
                            FilterControlWidth="100%" HeaderText="ผลการพิจารณา&lt;BR&gt;(กจ.)" ShowFilterIcon="false" 
                            UniqueName="approved_status">
                            <HeaderStyle HorizontalAlign="Center" Wrap="False" Width="100px"/>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" DataField="Status" FilterControlWidth="100%" 
                            HeaderText="สถานะ" ShowFilterIcon="false" UniqueName="Status" Visible="false">
                            <HeaderStyle HorizontalAlign="Center" Width="50px" Wrap="False" />
                        </telerik:GridBoundColumn>                         
                    </Columns>                        
                    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                </MasterTableView>
                <ClientSettings AllowColumnHide="True" 
                    AllowColumnsReorder="True" 
                    EnableRowHoverStyle="True" 
                    ReorderColumnsOnClient="True">                    
                    <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                </ClientSettings>
            </telerik:RadGrid>
        </asp:Panel>
        <asp:Panel ID="PanelAddData2" runat="server" Height="350px" Visible="false" width="950px" ScrollBars="Auto">
            <ul class="formListItem" id="Ul1">
            <div class="formList-detail">
                <table> 
                    <tr>
                    <td align ="right" width="220px" >
                        กิจกรรม :
                    </td>
                    <td align="left">
                        <asp:Label ID="lbActDescr" runat="server" ForeColor="Blue" Visible ="false"></asp:Label>
                        <telerik:RadComboBox ID="cmbActivity" Runat="server" 
                           AllowCustomText="true" 
                           CausesValidation="false" 
                           EmptyMessage=".. พิมพ์ที่นี่เพื่อช่วยค้นหา .." 
                           EnableLoadOnDemand="true" 
                           EnableTextSelection="true" 
                           EnableVirtualScrolling="true" 
                           Filter="Contains" 
                           Height="230px" MarkFirstMatch="false" 
                           OnClientTextChange="onTextChange"
                           ShowDropDownOnTextboxClick="true" 
                           ShowMoreResultsBox="true" Width="300px" 
                           HighlightTemplatedItems = "true"
                           AutoPostBack="true"
                           Onselectedindexchanged="cmbActivity_SelectedIndexChanged"                                           
                           onitemsrequested="cmbActivity_ItemsRequested">
                       </telerik:RadComboBox>   
                        <span class="validate">*</span>
                        <asp:RequiredFieldValidator runat="server" 
                            ID="RequiredFieldValidator1" 
                            ControlToValidate="cmbActivity"
                            ErrorMessage="กรุณาเลือกข้อมูลกิจกรรม" >
                        </asp:RequiredFieldValidator>
                    </td>
                </tr>
                </table>
            </div>                                
            <div class="formList-detail">
             <table> 
                <tr>
                   <td align="right" width="220px">
                           หน่วยงานที่จัด :
                        </td>
                    <td align="left">
                        <asp:Label ID="lblJobsite" runat="server" ForeColor="Blue"></asp:Label>
                    </td>
               </tr>
            </table>
        </div>                                
        <div class="formList-detail">
            <table>
            <tr>
               <td align="right" width="220px">
                    เปิดรับสมัครตั้งแต่วันที่ :
                </td>                
                <td align="left">
                    <asp:Label ID="lbDateSignStard" runat="server" ForeColor="Blue"></asp:Label>
                </td>
                    
                <td align="right" >
                    ถึงวันที่ :
                </td> 
                <td align="left">
                    <asp:Label ID="lbDateSignEnd" runat="server" ForeColor="Blue"></asp:Label>
                </td>
            </tr>
            </table>
        </div>
        <div class="formList-detail">
            <table>
            <tr>
               <td align="right" width="220px">
                    จัดกิจกรรมตั้งแต่วันที่ :
                </td>
                
                <td align="left">
                    <asp:Label ID="lbDateActStard" runat="server" ForeColor="Blue"></asp:Label>
                </td>
                    
                <td align="right">
                    ถึงวันที่ :
                </td> 
                <td align="left">
                    <asp:Label ID="lbDateActEnd" runat="server" ForeColor="Blue"></asp:Label>
                </td>
            </tr>
            </table>
        </div>                                                                    
        <div class="formList-detail">                 
             <table> 
                <tr>
                   <td align="right" width="220px">
                    จำนวนที่รับ :</td>
                
                <td align="left"> 
                    <asp:Label ID="lbActLimit" runat="server" ForeColor="Blue"></asp:Label>&#160;&#160;คน
                </td>
                <td align="right" width="220px">
                        จำนวนผู้สมัคร :
                    </td>
                    <td align="left">
                        <asp:Label ID="lbTotalTrainee" runat="server" ForeColor="Blue"></asp:Label>&#160;&#160;คน
                    </td>
                </tr>
            </table>
        </div>                                     
        <div class="formList-detail">
             <table> 
                <tr>
                   <td align="right" width="220px">
                            สถานที่ :
                        </td>
                        <td align="left">
                            <asp:Label ID="lblLocation" runat="server" ForeColor="Blue"></asp:Label>
                        </td>
                </tr>
            </table>
        </div> 
        <div class="formList-detail">
            <table> 
                <tr>
                   <td align="right" width="220px">
                        เมือง :
                    </td>
                    <td align="left"> 
                        <asp:Label ID="lblCity" runat="server" ForeColor="Blue"></asp:Label>
                    </td>
                    <td align="right" width="220px">
                        ประเทศ :
                    </td>
                    <td align="left">
                        <asp:Label ID="lblCountry" runat="server" ForeColor="Blue"></asp:Label>
                    </td>
                </tr> 
            </table>
        </div>
        <div class="formList-detail">
            <table> 
                <tr>
                <td align ="right" width="220px" >
                    ผู้บังคับบัญชา :
                </td>
                <td align="left" colspan="2">
                    <telerik:RadComboBox ID="cmbAppSeq" Runat="server" 
                       AllowCustomText="true" 
                       CausesValidation="false" 
                       EmptyMessage=".. พิมพ์ที่นี่เพื่อช่วยค้นหา .." 
                       EnableLoadOnDemand="true" 
                       EnableTextSelection="true" 
                       EnableVirtualScrolling="true" 
                       Filter="Contains" 
                       Height="230px" MarkFirstMatch="false" 
                       OnClientTextChange="onTextChange"
                       ShowDropDownOnTextboxClick="true" 
                       ShowMoreResultsBox="true" Width="300px" 
                       HighlightTemplatedItems = "true"
                       onitemsrequested="cmbAppSeq_ItemsRequested">
                   </telerik:RadComboBox>    
                    <span class="validate">*</span>
                    <asp:RequiredFieldValidator runat="server" 
                        ID="RequiredFieldValidator2" 
                        ControlToValidate="cmbAppSeq"
                        ErrorMessage="กรุณาเลือกผู้บังคับบัญชา" >
                    </asp:RequiredFieldValidator>
                </td>
            </tr>
            </table>
        </li>
        </ul> 
        <table style="width: 646px">
        <tr>                                    
        <td align="right" style="width: 321px">
            <asp:Button ID="btnSave2" onclick="btnSave2_Click" runat="server" CssClass="button" Text="ส่งใบสมัคร" Width="80px"/>   
            </td>
        <td align="left">
            <asp:Button ID="btnCancel2" OnClick="btnCancel2_Click" runat="server" CssClass="button" Text="ยกเลิก" Width="80px" CausesValidation="false" />
        </td>
        </tr>
        </table>
        
        </asp:Panel>
        </td>    
        </tr>            
        </table> 
        </div>
        </div>          
        </td>                                             
        </tr>
                
    </table>
    
    </asp:Panel>
    
    <telerik:RadWindowManager ID="RadWindowManager1" VisibleStatusbar="false" ReloadOnShow="true"
        runat="server" Skin="Vista">
        <Windows>
        <telerik:RadWindow 
            id="RadWindow1" 
            runat="server"        
            showcontentduringload="false"
            VisibleStatusbar="false"
            AutoSize = "true"
            title="สมัครไปปฏิบัติราชการชั่วคราวในต่างประเทศ"      
            Modal="true"
            behaviors="Close">
        </telerik:RadWindow>
    </Windows>        
    </telerik:RadWindowManager> 

</asp:Content>
